package com.lbd.mq;

import com.lbd.dynamicCode.bean.MsgSendRecord;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Demo class
 *
 * @author zzl
 * @date ${date}
 */
@Component
public class MessageSender {
    @Autowired
    private AmqpTemplate rabbitTemplate;
    public void send(MsgSendRecord record) {
        this.rabbitTemplate.convertAndSend("dynamic_code", record);
    }
}
